<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<form class="sform">

	<fieldset>
		<legend>服务设置</legend>
		<table class="processSettingTable">
			<thead>
				<tr>
					<th>活动</th>
					<th>服务</th>
				</tr>
			</thead>
			<tbody>
			   <c:set var="gindex"  value="0"   />
				<c:forEach var="step" items="${workflowDescriptor.steps}" varStatus="vs">
					
					<c:forEach items="${step.actions}" var="act" varStatus="avs">
					 
					   <input type="hidden" name="beans[${gindex}].workflowName" value="${workflowPk}" />
					   <input type="hidden" name="beans[${gindex}].actionId"	value="${act.id}" />
						
						<tr>
							<td><span class="label"> [${act.id}]-${act.name} </span></td>
							<td><span class="slist"> <select
									name="beans[${gindex}].sysService.id">
                                         <option value="NONE">选择服务</option>
                                         <optgroup label="可用服务">
										<c:forEach items="${syses}" var="serv">
											<option value="${serv.id}"
												${serv.id==beans[gindex].sysService.id?"selected":""}                          
                          >${serv.name}</option>
										</c:forEach>
</optgroup>
								</select>
							</span></td>
						</tr>
						 <c:set var="gindex" value="${gindex+1}" />
					</c:forEach>
				</c:forEach>
			</tbody>
		</table>



		<div>
			<button type="button" id="saveBtn">保存</button>
			<button type="reset">重置</button>
		</div>
	</fieldset>
</form>
<script type="text/javascript"
	src="scripts/apps/systemservicesetting/byworkflow.js"></script>